#ifndef __HUAWE_IOT_H__
#define __HUAWE_IOT_H__
#include <dtls_al.h>
#include <mqtt_al.h>
#include <queue.h>
#include <oc_mqtt_al.h>
#include <oc_mqtt_profile.h>

typedef enum
{
    en_msg_cmd = 0,
    en_msg_report,
    en_msg_conn,
    en_msg_disconn,
}en_msg_type_t;

typedef struct
{
    char *request_id;
    char *payload;
} cmd_t;

typedef struct
{
    int Humidity;        	//湿度
	int Temperature;     	//温度
    int Methane;      //甲烷浓度
    int Infra;        //红外线指数
    int AirQuality; //空气质量
    int Smoke;    //烟雾
} report_t;

typedef struct
{
    en_msg_type_t msg_type;
    union
    {
        cmd_t cmd;
        report_t report;
    } msg;
} app_msg_t;

typedef struct
{
    queue_t  *app_msg;
    int connected;
    int motor;
    int humidifier_status;
    int air_cleaner_status;
    int alarm_status;
}app_cb_t;

void huawei_iot_init(void);

#endif